adding flag type on write..