document command line usage
add tests