added part about extracting dictionary