add conditions for setting wrapper flags