using switch and return statements and create usable functions