removed mess of print debug statements