everything works great now just need to make a function to analyze the data plot it and find latency