refactored player calculator to use lambda