refactor out the remaining while loop in letter handler