by Jzj add register func