Closes #7, add sorting