minor improvements on api