Switch statement implemented