address a review comment and add more tests