renamed xSubString => xSubstring, and added better messages to logical hofs