Thanks, still not sure how to store the Z-values? Any ideas on that?

Also how to lookup a value based on a key-value pair?