#88 Final fix optional parameters and added tests for it