Changed trainmodel to traincontroller