old stuff, gonna rewrite most of this to conform with the new style of doing things