added method for printing character groups