Groups as agents with mental attitudes