added docopt and put everything in one script