add reply archive; rerange some code