cleaned up and made consistent with new text syntax