Create train class with initialization method