separated out embed implementations to make it easier to add new ones.