width and height changed to int