improving team filter, fixes #47