Updated certain outputs to meet project requirements
Wrote function to insert a node