use locks to stop multiple clients running concurrently