started to add variables for the state of the attempt, and added a general modal that can be used anywhere