Implementing lambda with multiple parameters