updated redis all to handle query