forked from: Flag with reflection

