An example of working code that it'd be easy to clean up