added smarter detail printing