Finished copy of sort controller