Changing locks code a little