massive rewrites..... finally happy with how I'm doin this now