Issue 20 sort error typo

here's the fix for issue 20. I've also added some doc strings. it's against the 1.0.x branch