added training and testing methods.