added extractData and resortData