added deleting and saving to device