refactor to new controller