refactored for node publishing; added todos