restructred js