Changed the duplication and overwriting