implemented unit test