updating figure generation