renamed 'public' to 'pub' to avoid conflict with c++ api