edited checks and commented out prints