improving script
improving script
implement adapter and duplicates removing