simplified operator<< logic