added the three t lines as arrays
added input, lines, calculate, and output functions