timing, buttons, save function

i added some more features and debbugged the code.