factor width and height into constants.