debugging the code with logs