clean up code + cancel