implemented Optimal pager
changed the frequency counter for pages