implementing with redis