Implementation of the example