updating lock