fixed bug in visualize so prints out attribute names and values properly