refactored trip data structuring to use hashes instead of arrays