Added customizable sort key. closes #3