Revised printNodes