train with algorithms not functions doh