added insert to namespace + small bugfixes