added type 3 to spawning