Added the function behind the Cancel-Botton