Modify order of javascript