added replace option, v0.2.2