solved delete problem and constructing datapoints from img