samr.internal function

Internal samr functions