Adding restore functionality