replaced ugly switch with array