added code snippets, license, updated readme