Replaced the reflections with lambda expressions