cleaning up the code after switching to redis locks