updated script and tests to reflect new dict return