replacing lambda with method reference