improved flag physics