separated the R funct with the A funct