improvements such as implementation of getopts