Shannon - code examples