input and test cases