added gzipping and getopt