Updated from deprecated api