divide work and create base table