edited constructNode