Homework 2, using page generator