redis logic added