rafactor controllers