michael: adapt trainer to deal with X and releasing of the string