add initialize for train class