linking api functions