implementing callback that outputs object's content to formatter
added formatter class