completed robust pagination