small improvement to API