updated saving teams functionality