always use brace for return statement if (width<0) {return; }