functional contiki-main