Hey, doesn't that look already better than all those if-else kludges?