make controller with 2 function