changing more deprecated apis