added redis code, not functional yet