refactoring controls - middle stage