self similar functions