fixed bug in DORE, backwards compatibility with DORE, refactored state logging