write unit test and make it pass