Adding restore funcionality