return keys and values as array