change js structure