scope issues fixed, but i'm a fucking idiot and just realized a better way to arhcitect the whole thing to avoid scope issues all together. sigh.