updated source code to remove debugging prints