debatable version of cas, removed all undefineds