ok this really ugly but ...