check for width and height of view also