edit getopts logic