adapted to the new api version 1.3