setNamespace method implementation