changed node class to use arrays