finished train methods for all functions