adde plotly function
integrated update for plotly