check if params is a function
correct tests
wrong assertions
Merge pull request #9 from vohof/patch/02

Fix bug on test and optional params