updated pagination logic