console archive finished(need some refactoring, performance check, and testing)