updated for new plotly api