use docopt.go; add coverage; refactor