tried to improve mesh traversal