why is "left" needed? please add a comment, not instantly obvious
Also in the lines before dot-notation is used, any reason to be inconsistent here and use bracket notation? ideally would be consistent, for easier reading.