Thats ugly and also doesn't support the 'default' case.