big ugly case statements