added create new spawn function prototype