placed javascript under assets instead of being in index