Updated program w/ errors & printing subprogram output