Code that was turned in. Mostly works except for large key value pairs