Why aren't you using a case statement or if/else here?