* coding guidelines unsigned*
* use getMaxX()
* reduce scope