solved moving, but undo button is still buggy