beginning of pagination fixes
added proper pagination
merged in pagination