improve mesh api