add a function create action in controller