train and test have been roughly implemented