The Role of IoT in Building Smart Cities