modified according to moquette v0.4