moves js to head