Challenges for adopting and implementing IoT in smart cities