now uses non-deprecated method