added replace proc