modified records directive and pagination directive