added an inspection routine
added pagination refining code