refraction problem solved