changed n.height to n.getHeight()