changed nodes to store ints instead of floats (precision!)