add some code for pass params