Finished implementing the function node