refracted some stuff
removed console logs