returning the init function from the chat cntrl