tidying up code examples