bunch of changes that maked all this work(with redis)