more changes to replace deprecated functions