re-add some old code