updated switch block to additional checking on update and patch