almost got extract working