function parameters are almost working