added outputHTML function