getopts done. need to check validity