removed print statements, done debugging