improved redis storage method