Old (and ugly) code from Ragg Tyme Studio (rughookinghome.com)