update deprecated API to call the new API directly