fixed the save counter, but still working on the actual save function. As for some reason it will not be open the savedialog function