added database support with redis