module rewritten to support redis versions from 2.2 to 2.8+