Replace self to ri