pretty good start to refactoring leader mode