generate and add pages