created node instance variables, wrote getindex function