got refraction back to almost working