contains b61b4d1 from master. tests for paging written and added to spec.