Adjusting this to take the other pages into account