added client code for locks