recoding + refactoring, same state