making it periodic every 5 samples