adapted printer to printing hashes