formatted the debugging code to be prettier