iterates through a hash and prints out key and value