remove calling of depricated api