add an function to archieve buffer in background