updating the extraction algorithm to extract rar and tar