moved controller to scope of body