changed to api ways