Refactored to use the HAR object instead of a Map