added code snippets and better bar graphs