add archive_flag
fix date range