added functions to get width and height