Updating solution to complete the pig script.
Fixed a small bug with case.