refactored the state of the attempt