made a widget that has the same functionality, along with sharedprefs implementation