added replace method