added deprecation flag to old method