updated tests for optional flags