updated for deprecation warning