add removeAllSlaves function