wrap state of path and priority from M into arguments passed to T to reduce duplciation of typing for the programmer