optimized a bit more