Add utils.go and test cases.
Update implementation and test cases.