spawning added
max and mins and function shell