updated js stracture