add test code
implement argument validation