now the code can work with if statements and without if statements