changed for automatic page generation