working extraction (witout gui)