update layout and js