Simplified the code by using property names to handle the desired request over using a switch statement