add compatible code