reimplement nmaster