Updated case statement