add marshal helper to share