Adding start of of restore function