Merge pull request #20 from ucsd-progsys/checkmeasure

overload checkSorted