removing nmaster, add uselessgaps