move away from deprecated api