implementing optional flags.
validating missing flags.