learning replace method