whitespace cosmetics
add pattern matching on errors