add -v, parse argv, better error handling, separate function, allz good