try to implement lock