size is unsigned
reduce var scoping