better redis handling, extract method