rm deprecated call to function