add sweet alert functionality