reimpemented using named pipes. Still quite unstable though it works for a time.