updated Node handling to work like browser