add function get entries with pagination