changing deprecated functions