setup uiDelegate