well this got a little more complicated...it should be done now though