register function and add  topics