Adding 'replace method with method object' example