functional model in iot geeksforgeeks