TODO
updated frequency correctly and destroying window when not recording due to battery not being pulugged in