parser for training file