implemented cast-cases up to an unimplemented helper function