Refactor letter changes solution to account for edge cases and accept additional arg for offset