refactoring control with redis