add two function: get_plans and get_plans_by_public.