corrected node keys and array layout