getopts for client