There is already a restore function :). But they actually could probably just be packaged into one function.