cleaned up both the example and the controller