created if else statement