check for overflow to figure out if new page needs to be added