initial code for dedup. needs debugging
finished dedup command