bug fixes; implementation of gatherSlaves