added code for wandering and fixed high pass cut off.