api and methods