implemented makechange the most important part is remove duplicates