added initial restore functionality