got publishing function working