added longest line code renamed from external variables