teach add to accept an object of key-value pairs