better cas code struct