debugging the codes