changed to a switch statement instead of ifs (also should have been else ifs )