split out some functionality into a new controller