Added auto archive functionality