separate main, apply-method to Spawn