Found on the interwebs solution to #12