moved all methods to application controller