added check for extracted and detached data