update JS structure