refractored 80%