Fix implementation and update test.
Add parameters.