update layout and UI