upgraded redis script