ensure  is defined