added spawn snippet