added nSlaves argument to DB creation functions