works under OSX now, mostly