update style and layout