case type checks and update