Proof of concept quality code here. It works.