adding the size-util code in this tools project for convenience + improved it at the same time