changed structure to replace