Cobbled together a working example