flags mostly functional