added a train method header
setup training method and file reading