tweaked index js