updated new js structure