adapt to version api 8