regularize the API