updated logs; refactoring