invoking api tick, better error handling