cleanup
change 'tail' parameters to mean 'target TMS state'
cleanup