adapt to api 3.5