WIP: search train
tidy up