add second function in app controller