you can change a chain of ifs to switch-case