change lambda function to protected method