print dictionary in a different format