code related to root put in new controller