work with if flags