created switch statement