added flag for width/height