adding loop in page tmp