handling undefined