breakout lpf into separate function

Closes #9