added close() to examples and tests