some reg functions