Initial implementation leaning heavily on the example code
provided in the description.