change style and flag