In the middle of error refactor