added custom mesh code