Removed giant switch statement for better solution