convert to flags