setup train class and began simulation function