why not use a switch statement here?