fixxed types and removed console logs