passing on parameters in a function