use something more perl idomatic then size