hash map of in use inputs, and actually working 2nd part