add some old code res