debugging code clean up