substitution of creating lines over and over again with a caching them in a
dict