change order of javascript