added restore and log functionality