mirror - moved function locally
tests - cleaned up; used the new init function