Beginning of the api