fix duplication, and test it