Changed code to accept blank values for text;