update layout for js