added some math.  Removed newlines
inner outer window