refactored with new methods and elminated global variables  Does not print arrays like old version because of the new print method