inner and outer are a little abstract to me here. Could you please add comments to explain what they are ?