added method to api