getting pretty close to something usable... debugging to commence