update content and layout