finished library pagination funcitonality. Necessary for large libraries