added *service* & *device_environment* fields working and dirty version