node edge code fixed and simple test written