replace deprecated calls