remove debugging print, remove useless if