wrapping spawning mechanism in class