add old codes, API changed