change functionality of redis from class to module