some optimizations in texts