a bit of performance optimization