avoid use of deprecated functions