made a getopts-like system