Adding replace method due to API changes. Not yet implemented.