check existence of keys before using them
figured out how to deal with wide buses