Use locally defined getWidth and getHeight functions