Made each functions iterate key-value objects as well