add legacy apis to  to keep backward compatibility