Inside calculations added.