Issue #100, got it working, needs testing