Refraction initial implementation