Working somewhat, but results are duplicating