Added mesh function