fix deprecated class and function