replaced pg with redis