passing variables to controller as parameters