Is there a way to make this clearer and more readable. [input.size-1-i] seems a little work to figure out what you are doing. But it does work and I understand but in a year would you understand what you did here without think about it much?