some old codes