Sort extract case statement
Add gem unpack to extract