add API for registration