changed  if code format  from [[]] to []