works except for that pesky looping oscillation