#516 optimized