using replace properly