Probably better off writing these as case statements