update layout and create new dialog