added getParams method for the controller to return all params as array