added alerts and prompts, tested to make sure code still works