got it working (almost)