cleaned up content builder function