adding clear function to snackbar