fixed deprecated api