added getopts and a quiet flag