restore some old code