Update spawnTask.java

Updated main class to work with both types of spawning process (natural and artificial)