adapted to API1.1