remove usage of deprecated api