(non-compilable state) semimarkov partially re-written (pointer vectors replaced with int vectors)