implemented redis locking