implemented atomic downloading + cancel downloading