work on message box, append function to root scope