implementation of the readme example