added 1-level, 2-level, and 3-level apipie definitions