space optimized, while performance not