added parameters for width and height