added method for API