A modal logic for updating and contracting