Working Code of nightscout