implement reflection and refraction