added debug method to mesh