adding api delegate