edited indexjs