replaced method requiring api >= 14