add unit test and more methods