cleaned up example embedding code