comparison was buggy, fixed with unique id