Removed loops, added low pass filter