modified case statement to use unpack since string[] is not int anymore