choose mode of operation based on cli flag
tweak flags, better error handling
input validation