add unit test functionality