less code
fix it up
fix test case