Adding replace function