change depracated code