changed the class to be used with arguments or with scanner, depending on if arguments exist