moved some js to index