add methods and test cases