p1: add doctest