doesn't work if you have two if statements