small improvement in api