Re wrote process function for 10k sample rate