Changing letter_id to a variable instead of a function