r=self adding changes for library