pages is an array