changed so that R is calculated even for frozen params.