Could you change this into a method located at the end of the context? We usually avoid using `let`s.