that's a nice trick, get rid of the big case statement