left a few debug calls in the code