update js structure