fix run button bugs, add function to go from 2D to 1D