changed api to link animals to other tables