added team users ans non team users functionality