added function to save and load sensors