(work in progress) inference algorithm with immediate resolution ; trying an efficient approach