backend saveTree