export callMain through closure