better process calling, apply function