send right number of parameters to function