rewritten PG notebook