change to non-deprecated functions