fixing import error for deprecated function