write util unit tests