change sync publish to async