add tests and fix bug in handling of extra_parameters

Fixes issue #70