got it working with parameters