primus implementation almost finished