implemented redis query