modified example and fix error syntax
added instructions in readme