implemented removing of duplicats