Implement onTick function and get telemetry working