added support for registrating pi