Wrapped up training and testing part