fix deprecated functions