minor improvements of performance