All api functions implemented