implement Node constructor