make getting line template smarter