refactory for save teams