working on inference machine output routines