Sorted was not being passed if instantiating via function
Merge pull request #4 from MikkoH/master

Sorted was not being passed if instantiating via function