Added replace function