doesn't re-create lin object on each function call