update some old code