added code samples to generic example. added MIT license