changing method of removing used rows of data frame