Updating to non-deprecated API