Added parameter for returning first & last pages