optimizing page outputing