Fixed issue #4 and example added