added functions for redis