Changes to work with redis