had a buggy formula for number of pages