fix api
add some correctness testing