modified case statement