adding api functions