moved to dictionary method rather than n query method for decoding
agencyid