p2: add defined method