formatted code and updated logs