add tests and fix bug in handling of extra_parameters
Merge pull request #72 from garethr/multi-parameters-bug

add tests and fix bug in handling of extra_parameters