make the API a class