change to asserting malloc
stab at u2_plan struct
add plam/plan interface