Added generic replace