insert fixed and test added

no duplicates can be inserted