Updated pull request #28 to make it production ready

@stefek99 - finally getting your example merged in. Thanks for the contribution!