somewhat working telemetry code