Same example as above (remove duplication of code blocks in the example)