added namespacing - still working out all the tweeks though