removed old unused code and print statements