Reflection function added. More changes to come