changed spawn calls to be consistent with syntax of pt 4