added code for reflections