added appendix with code examples