logic of archiveActivity.java