finished up the statistics stuff and wrapped up the train and test as functions