checking that if statement works