add train and test method