added spawn method