implement lock