commit demo 5 - functions in controller