update js and layout