added code to ignore blanklines for formatting