updated plotly functions, fixed minor bugs