add toParams method