implemented issue 24 (get current state)