added replace option