restore some code