#89 refactoring State: finished