A meritocratic trust-based group formation in an IoT environment for smart cities