removed nested loop extra page