new server version, with registering function