fixed off by one error, and updated original file documentation