implement in-place value sorting
add test cases
add comments