changed height and width calculations