ensuring width is an int