Works decently, but doesn't behave well with potentials.

If you can find out why this is weird... gold star for you